<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>康健因星创平台信息中心</title>
		<script src="__INDEX__/js/mui.min.js"></script>
		<link href="__INDEX__/css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="__INDEX__/css/iconfont.css" />
		<link rel="stylesheet" href="__INDEX__/css/style.css" />
		<link rel="stylesheet" href="__INDEX__/css/mall.css" />
		<link rel="stylesheet" href="__INDEX__/css/LArea.css" />
	</head>
	<body>

		<div class="mui-content ">
			{include file="public/member" /}
			<div class="glj_bt"><span class="mui-icon iconfont icon-dingdan4"></span><em style="padding-left: 20px;"> 康健因星创平台信息中心</em></div>
			<div class="gerenzl_nr">
				<form id='my_form' class="mui-input-group gerenzl_group layui-form update_form">
					
					<p id="no_record" style="color:#D6AA50;text-align: center;display: none;">数据已加载完毕</p>
				</form>
			</div>
		</div>
		<input type="hidden" id="page" value="1" />
		{include file="public/bottom" /}
	</body>
</html>
{include file="public/footer" /}
<script src="__PUBLIC__/static/js/mui.min.js"></script>
<script>
	get_data();
	function get_data(){
			$.ajax({
			type:"post",
			data:{
				page:$("#page").val()
			},
			url:"{:url('index/member/home_list')}",
			success:function(data){	
				var list=data.list;
				var html="";
				if(list&&list.length>0){
					for(var i=0;i<list.length;i++){
						var log=list[i];
						var url = "home_page?id="+log.id;
					    html+='<a href="'+url+'">'+
					    	'<div class="mui-input-row ">'+
								'<label style="width: 49.9%;">'+log.home_name+'</label>'+
								'<label style="width: 49.9%;float: right;">发布时间:'+log.add_time.substring(0, 10)+'</label>'+
							'</div></a>'+
							'<div style="height:5px;background-color: #EFEFF4;"></div>';
					}
				}else{
					$("#no_record").show();
				}
				$(".update_form").append(html);
				
			}
		});
	}
	$(window).scroll(function(){
		var scrollTop = $(window).scrollTop();       //滚动条高度
		var bodyheight = $(document).height();         //文档的高度
		var windowheight = window.innerHeight;	//$(window).height();              //当前窗体的高度
		if((bodyheight - windowheight - scrollTop) == 0){
			$.ajax({
			type:"post",
			data:{
				page:parseFloat($("#page").val())+1
			},
			url:"{:url('index/member/home_list')}",
			success:function(data){	
				var list=data.list;
				var html="";
				if(list&&list.length>0){
					$("#page").val(parseFloat($("#page").val())+1);
					for(var i=0;i<list.length;i++){
						var log=list[i];
					    html+='<div class="mui-input-row ">'+
								'<label style="width: 23%;">'+log.home_name+'</label>'+
								'<label style="width: 38%;float: right;">发布时间:'+log.add_time.substring(0, 10)+'</label>'+
							'</div>'+
							'<div style="height:5px;background-color: #EFEFF4;"></div>';
					}
				}else{
					$("#no_record").show();
				}
				$(".update_form").append(html);
				
			}
		});
		
		}				
	})
	
</script>